package com.tuling.mall.common;

import java.util.HashMap;

public class R extends HashMap<String, Object> {

    private R() {
    }

    public static R success() {
        R r = new R();

        r.put("code", 200);
        r.put("msg", "success");

        return r;
    }

    public static R error(int code, String msg) {
        R r = new R();
        r.put("code", code);
        r.put("msg", msg);
        return r;
    }

}
